package com.wksc.framework.impexp.util;

import jxl.format.CellFormat;
import jxl.format.Colour;
import jxl.write.WritableCellFormat;
import jxl.write.WritableFont;
import jxl.write.WriteException;

/**
 * <p> Title(文件名): ExcelTool.java </p>
 * <p> Description(描述): Excel字体与格式等的设定类</p>
 * <p> Copyright(版权): Copyright (c) 2011 </p>
 * <p> Company(公司): 成都四方信息技术有限公司 </p>
 * <p> CreateTime(生成日期)：2011-12-16 上午09:54:22 </p>
 * @author wanglei
 * @version impExp_C13
 */
public class ExcelTool {
	public enum WRITE_STYLE{
		RED_FONT
	}
	
	public static CellFormat getRedFont(){
		CellFormat cellFormat = null;
		//设定失败信息的字体格式
		WritableFont errFont = new WritableFont(WritableFont.ARIAL);
		try {
			errFont.setColour(Colour.RED);
			cellFormat = new WritableCellFormat(errFont);
		} catch (WriteException e) {
			cellFormat = new WritableCellFormat();
		}
		return cellFormat;
	}
}
